<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <div class="alert alert-danger" role="alert">
        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
            <span aria-hidden="true">&times;</span>
        </button>
        <span class="sr-only">温馨提示:</span>
        <ol>
            <li>通过搜索工具可以搜索出相应的成员</li>
            <li>选中该成员，代表管理员可以编辑删除，添加后代的操作</li>
        </ol>
    </div>
    <form class="form-inline">
        <div class="form-group">
            <label for="name">成员名</label>
            <input type="text" name="name" value="{$name}" class="form-control" id="name" placeholder="成员名">
        </div>
        <div class="form-group">
            <label for="clan">房族</label>
            <select id="clan" name="clan_id" class="form-control">
                <option value="">请选择...</option>
                <foreach name="clan_tree" item="vo">
                    <option value="{$vo.id}" <if condition="$clan_id==$vo.id">selected="selected"</if>>
                        <for start="0" end="$vo.level">
                            |-
                        </for>
                        {$vo.name}
                    </option>
                </foreach>
            </select>
        </div>
        <button type="submit" class="btn btn-default">搜索</button>
    </form>
    <div class="well well-lg" style="max-height:500px;overflow-y: scroll;margin-top:20px;">
        <form action="{:url('admin/rbac/familyMemberSubmit')}" method="post">
        <input type="hidden" value="{$id}" name="id">
            <table class="table">
            <thead>
            <tr>
                <th></th>
                <th>名</th>
                <th>字</th>
                <th>世代</th>
                <th>房族</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="list" item="vo">
                <tr>
                    <td>
                        <input type="radio" name="member_id" value="{$vo.id}" <if condition="isset($role_list['member_id'])&&$role_list['member_id']==$vo['id']">checked="checked"</if>>
                    </td>
                    <td>{$vo.name}</td>
                    <td>{$vo.style_name}</td>
                    <td>{$vo.generation}</td>
                    <td>{$vo.clan_name}</td>
                </tr>
            </foreach>
            </tbody>
        </table>
            <button type="submit" class="btn btn-primary">确定</button>
            <a class="btn btn-default" href="{:url('admin/rbac/authorize',['id'=>$id])}">返回</a>
        </form>
        </div>
</div>
</body>
</html>